﻿package mortal.game.view.forging.view
{
    import flash.events.*;
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.resource.info.item.*;
    import mortal.game.view.common.*;
    import mortal.game.view.forging.data.*;
    import mortal.game.view.guide.*;
    import mortal.mvc.core.*;

    public class StrengthenIcon extends HintBaseIcon
    {
        private var _data:ItemData;
        private static var _instance:StrengthenIcon;

        public function StrengthenIcon(param1:String)
        {
            super(param1);
            if (_instance != null)
            {
                throw new Error("StrengthenIcon singleton!");
            }
            return;
        }// end function

        public function set data(param1:ItemData) : void
        {
            this._data = param1;
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            var _loc_2:Object = {};
            _loc_2["pageIndex"] = ForgingConst.Page_EquipStrengthen;
            _loc_2["equipData"] = this._data;
            Dispatcher.dispatchEvent(new DataEvent(EventName.OpenForgingPanel, _loc_2));
            Dispatcher.dispatchEvent(new DataEvent(EventName.ForgingOperateByTips, this._data));
            GuideController.currentGuideItemWin = ModuleType.Build;
            this.hide();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl();
            this._data = null;
            return;
        }// end function

        public static function get instance() : StrengthenIcon
        {
            if (!_instance)
            {
                _instance = new StrengthenIcon(ImagesConst.StrengTipIcon);
            }
            return _instance;
        }// end function

    }
}
